package svgedit.germangui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

import svgedit.germangui.GermanFrame;

/** Shows discard changes dialog, then sets the document to a new,
 *  empty document.
 */
@SuppressWarnings("serial")
public class NewDocumentAction extends AbstractAction {

    private GermanFrame germanFrame;

    /** Create this action for the given frame */
    public NewDocumentAction(GermanFrame germanFrame) {
        super("Neue");
        this.germanFrame = germanFrame;
    }

    public void actionPerformed(ActionEvent ae) {
        if (germanFrame.confirmSaveChanges())
        	germanFrame.newFile();
    }


}
